home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: watzka@stat.uni-muenchen.de (Kurt Watzka)
- Newsgroups: comp.lang.c
- Subject: Re: Reading files - DOS & UNIX
- Date: 9 Feb 1996 09:42:12 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4ff4tk$i6b@sparcserver.lrz-muenchen.de>
- References: <cakamman.823793386@isum2.iastate.edu>
- NNTP-Posting-Host: sun2.lrz-muenchen.de
-
- cakamman@iastate.edu (Chris A Kamman) writes:
-
- >Hi,
-
- > I would like to have the same program read text files on SUN and
- >PC.
-
- > What I ended up doing was - use fopen with rb mode. Then remove
- >the linefeed and carraige return characters if they exist. This solu
- >works.
-
- But why do you want to do that? Opening the file and reading lines
- with fgets() works quite well, both on a SUN and a PC.
-
- The standard C library is responsible for and capable of dealing
- with different line terminatiors on different systems.
-
- Kurt
- --
- | Kurt Watzka Phone : +49-89-2180-6254
- | watzka@stat.uni-muenchen.de
- | ua302aa@sunmail.lrz-muenchen.de
-